home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: dd.chalmers.se!news.chalmers.se!sunic!EU.net!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!jamie
- From: jamie@cdevil.unx.sas.com (James Cooper)
- Subject: Re: interrupt in SAS/C 6.51
- Originator: jamie@cdevil.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <CMAuIr.FH@unx.sas.com>
- Date: Mon, 7 Mar 1994 14:49:39 GMT
- References: <1994Mar6.035403.28339@cdf.toronto.edu>
- Nntp-Posting-Host: cdevil.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 49
-
-
- In article <1994Mar6.035403.28339@cdf.toronto.edu>, a228grai@cdf.toronto.edu (Darrell Grainger) writes:
- >I just received my upgrade to SAS/C 6.50 and thought I'd try whipping up a
- >few programs. One of the programs I have created uses AddIntServer to add
- >a vertical blank interrupt. Here is the set up in the C code:
- >
- > [code deleted]
- >
- >Now if I create the function VertBServer using assembler I can get this to
- >work fine but what I would like to do (and this is just for experimental
- >purposes) is create the function VertBServer using C language. The code
- >for VertBServer is simply:
- >
- > Signal(task, SIGBREAKF_CTRL_F);
- >
- >The variable task is a global variable initialized by the main code using:
- >
- > task = FindTask(NULL);
- >
- >I've read some stuff about __interrupt in the SAS/C manual but it is not
- >entirely clear. I think I am probably not setting the Z flag when exiting
- >the VertBServer function. References to the manuals would actually be
- >appreciated.
-
- Look up two SAS specific keywords (you'll need both of them).
-
- __interrupt - page 173, User's Guide Volume 1
-
- This will set your code up properly to
- be an Interrupt function, and will take
- care of the return code, flags, etc. on
- exit from the routine.
-
- __saveds - pages 174-175, User's Guide Volume 1
-
- This will set up A4 properly on entry to
- your function, so that you can access
- global data for your code (such as your
- 'task' variable).
-
- --
- ---------------
- Jim Cooper
- (jamie@unx.sas.com) bix: jcooper
-
- Any opinions expressed herein are mine (Mine, all mine! Ha, ha, ha!),
- and not necessarily those of my employer.
-
- Remember, "Euphemisms are for the differently brained."
-